package com.itheima.day09;

import java.util.Scanner;

public class day09biaojiwei {
    public static void main(String[] args) {
        int[] arr = {111,222,111,333,66,78};
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入要查找的元素");
        int num = sc.nextInt();
        int index = -1;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] == num){
                index = i;
                break;
            }
        }
        if(index == -1){
            System.out.println(num + "元素不存在");
        }else{
            System.out.println(num + "元素的位置:" + index);
        }
    }
}
